package com.shortchina.common.util;

import org.apache.commons.lang.time.DateUtils;
import org.springframework.util.DigestUtils;

import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.util.Date;

/**
 * md5工具类
 *
 * @author fc
 * @version 1.0
 * @data 2024/12/23 9:00 下午
 **/
public class MD5Util {
    // 62个字符的数组，包含数字、小写字母和大写字母
    private static final String BASE62_CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";

    public static String encryptStr(String str) {
        return DigestUtils.md5DigestAsHex(str.getBytes(StandardCharsets.UTF_8)).substring(8, 14);
    }
}
